@extends('layout.index')

@section('content')
<div class="mws-panel grid_8">
	<div class="mws-panel-header">
    	<span>商品修改</span>
    </div>
    <div class="mws-panel-body no-padding">

        @if (count($errors) > 0)
		   <div class="mws-form-message error">
		        <ul>
		            @foreach ($errors->all() as $error)
		                <li>{{ $error }}</li>
		            @endforeach
		        </ul>
		    </div>
		@endif

    	<form action="/admin/goods/update" method='post' enctype="multipart/form-data" class="mws-form">
    		<div class="mws-form-inline">

    			<div class="mws-form-row">
    				<label class="mws-form-label">商品名:</label>
    				<div class="mws-form-item">
    					<input type="text" name='goodsname' value="{{ $row->goodsname}}"class="small">
    				</div>
    			</div>
    			
    			<div class="mws-form-row">
    				<label class="mws-form-label">商品图片:</label>
    				<div class="mws-form-item">      
                    <img src="{{$row->goodspic}}" width='120px' height='80px'>               
                    <div class='small'>
                      <input type="file" name='newgoodspic' value="{{$row->goodspic}}">
                    </div>  
                          
    				</div>
    			</div>  
                <div class="mws-form-row">
                    <label class="mws-form-label">商品价格:</label>
                    <div class="mws-form-item">
                        <input type="text" name='goodsprice' value="{{$row->goodsprice}}" class="small">
                    </div>
                </div>  
                <div class="mws-form-row">
                    <label class="mws-form-label">商品描述:</label>
                    <div class="mws-form-item">
                        <input type="text" name='goodsdesc' value="{{$row->goodsdesc}}" class="small">
                    </div>
                </div>  
                <div class="mws-form-row">
                    <label class="mws-form-label">商品库存:</label>
                    <div class="mws-form-item">
                        <input type="text" name='goodsnum' value="{{$row->goodsnum}}" class="small">
                    </div>
                </div>  
                <div class="mws-form-row">
                    <label class="mws-form-label">商品状态:</label>
                    <div class="mws-form-item">
                        <input type="text" name='status' value="{{$row->status}}" class="small">
                    </div>
                </div>  





                    			
    		</div>
    		<div class="mws-button-row">
    			{{ csrf_field() }}
                <input type="hidden" name='id' value="{{$row->id}}">
    			<input type="submit" class="btn btn-danger" value="修改">
    			<input type="reset" class="btn " value="重置">
    		</div>
    	</form>
    </div>    	
</div>
@endsection